<div class="page_deer_tip_area alert alert-success-light" style="width: 400px;margin:120px auto;">请将鼠标放在左侧手机内，点击相应板块可以开始编辑</div>
<form  role="form"  method="POST" action="">
    <input type="hidden" id="page-id" name="page-id" value=""/>
    <input type="hidden" id="page-block" name="page-block" value=""/>


    <!-- 标题设置 -->
    {php}
    $pageData['title'] = isset($pageData['title']) ? $pageData['title'] : [
            'text'=>'宇鹿家政PRO'
            ,'logo_show'=>'2'
            ,'logo'=>''
        ];
    {/php}
    <div class="form-group row deer_design deer_design_title">
        <label class="control-label col-xs-12 deer_design_title_tags"><i class="fa fa-bookmark"></i> 标题设置</label>
        <div class="col-xs-12">
            <div class="radio-group" style="margin-bottom: 15px;">
                <label class="radio-inline">
                    <input type="radio" name="row[title][logo_show]" value="2" {if condition="$pageData.title.logo_show == 2"}checked{/if}> 文字
                </label>
                <label class="radio-inline">
                    <input type="radio" name="row[title][logo_show]" value="1" {if condition="$pageData.title.logo_show == 1"}checked{/if}> 图片
                </label>
            </div>
            
            <div class="form-group title-logo_show" id="title-logo_show-2" {if condition="$pageData.title.logo_show == 1"}style='display:none;'{/if}>
                <label>标题文字</label>
                <input type="text" class="form-control" name="row[title][text]" value="{$pageData.title.text}" placeholder="请输入标题文字">
            </div>
            
            <div class="form-group title-logo_show" id="title-logo_show-1" {if condition="$pageData.title.logo_show == 2"}style='display:none;'{/if}>
                <label>标题图片</label>
                <div class="input-group">
                    <input id="c-logo" class="form-control" size="50" name="row[title][logo]" type="text" value="{$pageData.title.logo}">
                    <div class="input-group-addon no-border no-padding">
                        <span><button type="button" id="plupload-logo" class="btn btn-danger plupload" data-params='{"category":"design"}' data-input-id="c-logo" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-logo"><i class="fa fa-upload"></i> {:__('Upload')}图片</button></span>
                        <span><button type="button" id="fachoose-logo" class="btn btn-primary fachoose" data-input-id="c-logo" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}图片</button></span>
                    </div>
                </div>
                <ul class="deer-select-slide-box row list-inline plupload-preview" id="p-logo" ></ul>
            </div>
        </div>
    </div>
    <!-- 热门搜索词 -->
    <div class="form-group row deer_design deer_design_tags">
        <label class="control-label col-xs-12 deer_design_title_tags"><i class="fa fa-bookmark"></i> 快捷搜索标签列表（多个以逗号隔开）</label>
        <div class="col-xs-12">
            <textarea name="row[tags]" id="deer_tags_val" class="form-control" cols="30" rows="5">{$pageData.tags|implode=',',###}</textarea>
        </div>
    </div>
    <div class="deer_block_clear"></div>
    <div class="form-group row deer_design deer_design_slide ">
        <label class="control-label col-xs-12 deer_design_title_banner deer_design_title_slide"><i class="fa fa-bookmark"></i> 幻灯广告（790*250）</label>
        <div class="col-xs-12">
            <div class="input-group">
                <input id="c-images" data-rule="required" class="form-control" size="50" name="row[slide][img]" type="hidden" value="{$pageData.slide.img}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-images" class="btn btn-danger plupload"  data-params='{"category":"design"}' data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}图片</button></span>
                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}图片</button></span>
                    <span style="margin-left: 20px;">按住下方图片拖动可以排序</span>
                </div>
                <span class="msg-box n-right" for="c-images"></span>
            </div>
            <ul class="deer-select-slide-box row list-inline plupload-preview" id="p-images" data-template="desctpl" data-name="row[slide][json]"></ul>
            <textarea name="row[slide][json]"  class="form-control hidden" style="margin-top:5px;">{$pageData.slide.json}</textarea>
        </div>
    </div>
    <div class="deer_block_clear"></div>
    <!-- 服务保障-->
    {php}
        $pageData['guarantee'] = isset($pageData['guarantee']) ? $pageData['guarantee'] : [
            ['icon'=>'cuIcon-time','text'=>'迟到必赔'],
            ['icon'=>'cuIcon-refresh','text'=>'不满意重做'],
            ['icon'=>'cuIcon-service','text'=>'7x24小时服务'],
            ['icon'=>'cuIcon-safe','text'=>'全程保障']
        ];
    {/php}
    <div class="form-group row deer_design deer_design_guarantee">
        <label class="control-label col-xs-12 deer_design_title_tags"><i class="fa fa-bookmark"></i> 服务保障</label>
        <div class="col-xs-12" style="width: 600px;">
            {volist name="$pageData.guarantee" id="item" key="key"}
            <div class="row mb-2">
                <div class="col-xs-5">
                    <div class="input-group">
                        <span class="input-group-addon"><i class="{$item.icon}"></i></span>
                        <input type="text" name="row[guarantee][{$key}][icon]" class="form-control" placeholder="标题" value="{$item.icon|default=''}">
                    </div>
                </div>
                <div class="col-xs-7">
                    <input type="text" name="row[guarantee][{$key}][text]" class="form-control" placeholder="描述" value="{$item.text|default=''}">
                </div>
            </div>
            {/volist}
        </div>
    </div>
    <div class="deer_block_clear"></div>
    <div class="form-group row deer_design deer_design_cate ">
        <div class="alert alert-success-light" style="width: 300px;margin-left:20px;">这里在【服务类目】编辑是否在首页展示</div>
    </div>
    <div class="deer_block_clear"></div>
    <!-- 公告 -->
    {php}
        $pageData['notice'] = isset($pageData['notice']) ? $pageData['notice'] :"";
    {/php}
    <div class="form-group row deer_design deer_design_notice">
        <label class="control-label col-xs-12 deer_design_title_tags"><i class="fa fa-volume-up"></i> 公告内容（留空则隐藏）</label>
        <div class="col-xs-12">
            <textarea name="row[notice]" id="deer_notice_val" class="form-control" cols="30" rows="5">{$pageData.notice}</textarea>
        </div>
    </div>
    <div class="deer_block_clear"></div>
    <div class="form-group row deer_design deer_design_block">
        <label class="control-label col-xs-12 deer_design_title_tags"><i class="fa fa-bookmark"></i> 自定义模块（55*55）</label>
        <div class="col-xs-12">
            <div class="input-group mb-2 ">
                <span class="input-group-addon" >显示</span>
                <input  id="c-switch" name="row[block][show]" type="hidden" value="{$pageData.block.show}">
            
                <div class="form-control">
                    <a href="javascript:;" data-toggle="switcher" class="btn-switcher " data-input-id="c-switch" data-yes="1" data-no="0" >
                        <i class="fa fa-toggle-on text-success  fa-2x {if condition='$pageData.block.show==0'}fa-flip-horizontal text-gray{/if} "></i>
                    </a>
                </div>
            </div>
            <div class="input-group mb-2 ">
                <span class="input-group-addon" >标题</span>
                <input type="text"  name="row[block][title]" class="form-control" value="{$pageData.block.title}"/>
            </div>
            <div class="input-group mb-2 ">
                <span class="input-group-addon" >描述</span>
                <input type="text"  name="row[block][desc]" class="form-control" value="{$pageData.block.desc}"/>
            </div>
        </div>
        <div class="col-xs-12">
            <div class="input-group">
                <input id="c-images3" data-rule="required" class="form-control" size="50" name="row[block][img]" type="hidden" value="{$pageData.block.img}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-images3" class="btn btn-danger plupload"  data-params='{"category":"design"}'  data-input-id="c-images3" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images3"><i class="fa fa-upload"></i> {:__('Upload')}图片</button></span>
                    <span><button type="button" id="fachoose-images3" class="btn btn-primary fachoose" data-input-id="c-images3" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}图片</button></span>
                    <span style="margin-left: 20px;">按住下方图片拖动可以排序</span>
                </div>
                <span class="msg-box n-right" for="c-images3"></span>
            </div>
            <ul class="deer-select-slide-box row list-inline plupload-preview" id="p-images3" data-template="desctpl" data-name="row[block][json]"></ul>
            <textarea name="row[block][json]"  class="form-control hidden" style="margin-top:5px;">{$pageData.block.json}</textarea>
        </div>
    </div>
    <div class="deer_block_clear"></div>
    <div class="form-group row deer_design  deer_design_banner_center">
        <label class="control-label col-xs-12 deer_design_title_banner deer_design_title_slide"><i class="fa fa-bookmark"></i> 中间Banner（留空则不显示）</label>
        <div class="col-xs-12">
            <div class="input-group">
                <input id="c-images2"  class="form-control" size="50" name="row[banner_center][img]" type="hidden" value="{$pageData.banner_center.img}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-images2" class="btn btn-danger plupload"  data-params='{"category":"design"}'  data-input-id="c-images2" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-images2"><i class="fa fa-upload"></i> {:__('Upload')}图片</button></span>
                    <span><button type="button" id="fachoose-images2" class="btn btn-primary fachoose" data-input-id="c-images2" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}图片</button></span>
                </div>
                <span class="msg-box n-right" for="c-images2"></span>
            </div>
            <ul class="deer-select-slide-box row list-inline plupload-preview" id="p-images2" data-template="desctpl" data-name="row[banner_center][json]"></ul>
            <textarea name="row[banner_center][json]"  class="form-control hidden" style="margin-top:5px;">{$pageData.banner_center.json}</textarea>
        </div>
    </div>
    <div class="deer_block_clear"></div>
    <div class="form-group row deer_design  deer_design_banner_bottom">
        <label class="control-label col-xs-12 deer_design_title_banner deer_design_title_slide"><i class="fa fa-bookmark"></i> 底部Banner（留空则不显示）</label>
        <div class="col-xs-12">
            <div class="input-group">
                <input id="c-images4"  class="form-control" size="50" name="row[banner_bottom][img]" type="hidden" value="{$pageData.banner_bottom.img}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-images4" class="btn btn-danger plupload"  data-params='{"category":"design"}'  data-input-id="c-images4" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-images4"><i class="fa fa-upload"></i> {:__('Upload')}图片</button></span>
                    <span><button type="button" id="fachoose-images4" class="btn btn-primary fachoose" data-input-id="c-images4" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}图片</button></span>
                </div>
                <span class="msg-box n-right" for="c-images4"></span>
            </div>
            <ul class="deer-select-slide-box row list-inline plupload-preview" id="p-images4" data-template="desctpl" data-name="row[banner_bottom][json]"></ul>
            <textarea name="row[banner_bottom][json]"  class="form-control hidden" style="margin-top:5px;">{$pageData.banner_bottom.json}</textarea>
        </div>
    </div>
    <div class="deer_block_clear"></div>



    <div class="deer_block_clear"></div>
    <div class="form-group row deer_design"  id="deer_sub_box">
        <label class="control-label col-xs-12"></label>
        <div class="col-xs-12">
            <button type="submit" style="width: 200px;" class="btn btn-success ">保 存</button>
        </div>
    </div>
</form>

<!--这里自定义图片预览的模板 开始-->
<script type="text/html" id="desctpl">
    <li class="col-xs-8" style="width:410px;height:310px;background-color: #e6e6e6;margin: 10px;padding:20px;">
        <a href="<%=fullurl%>" data-url="<%=url%>" target="_blank" class="thumbnail" style="width:370px;height:135px;">
            <img src="<%=fullurl%>" style="height:125px;" class="img-responsive">
        </a>
        <div class="input-group mb-1">
            <span class="input-group-addon" >点击事件</span>
            <select class="form-control deer-select-slide-change" name="tpl[<%=index%>][type]" >
                <option value="no">无</option>
                <option value="item" <%=(value?value['type']:'')=='item'?'selected':''%> >跳转商品</option>
                <option value="yhq" <%=(value?value['type']:'')=='yhq'?'selected':''%>>优惠券领取界面</option>
            </select>
        </div>
        <div class="input-group mb-1">
            <span class="input-group-addon" >图片主色调</span>
            <input class="form-control" name="tpl[<%=index%>][color]" placeholder="选填，格式#000000" value="<%=value?value['color']:''%>"></input>
        </div>
        <div class="input-group mb-1 deer-select-slide-change-items <%=(value?value['type']:'')=='item'?'':'hide-deer'%>">
            <span class="input-group-addon">ID</span>
            <input type="text" readonly  name="tpl[<%=index%>][id]"  placeholder="请选择" class="form-control form-control-id" value="<%=value?value['id']:''%>"/>
            <input type="text"  name="tpl[<%=index%>][desc]" class="form-control form-control-desc" placeholder="请选择" value="<%=value?value['desc']:''%>"/>
            
            <span class="input-group-addon btn-deer-dialog" style="cursor:pointer" data-urlpop="deerhome/design/items"  title="选择商品"> <i class="fa fa-hand-o-up"></i> 选择商品</span>
            
        </div>
        
        <a href="javascript:;" class="btn btn-xs btn-danger btn-trash" style="width:60px;"><i class="fa fa-trash"></i></a>
    </li>
</script>
<!--这里自定义图片预览的模板 结束-->